﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Collections.ObjectModel;
using FuelTracker.Models;
using FuelTracker.Services;
using System.Linq;
using Caliburn.Micro;
using System.Diagnostics;
using FuelTracker.Resources;
using FuelTracker.ViewModels;
using System.Collections.Generic;


namespace FuelTracker.DesignTimeData
{
    public class FuelLogsDesignTimeViewModel : Screen
    {
        private ObservableCollection<FuelLogViewModel> fuelLogs = new ObservableCollection<FuelLogViewModel>();
        public ObservableCollection<FuelLogViewModel> FuelLogs
        {
            get { return fuelLogs; }
        }

        public Vehicle Vehicle { get; private set; }

        public FuelLogsDesignTimeViewModel()
        {
            Vehicle = new Vehicle("Alte Schrottkarre")
               {
                   FuelLogs = new List<FuelLog>
                    {
                        new FuelLog(DateTime.Now.AddDays(-13), 600, 60, 90),
                        new FuelLog(DateTime.Now, 550, 57, 88.50M),
                        new FuelLog(DateTime.Now, 500, 57, 88.50M)
                    }
               };

            foreach (FuelLog f in Vehicle.FuelLogs)
            {
                fuelLogs.Add(new FuelLogViewModel(f));
            }
        }

        public void AddNewFuelLog()
        {
            Debug.WriteLine("AddNewFuelLog clicked");
        }

        #region Localization
        
        public string LabelApplicationTitleCaps
        {
            get { return Texts.Lbl_ApplicationTitleAllCaps; }
        }

        public string LabelFuelLogs
        {
            get { return Texts.Lbl_FuelLogs; }
        }

        public string LabelGraphic
        {
            get { return Texts.Lbl_Graphic; }
        }

        public string LabelConsumption
        {
            get { return Texts.Lbl_Consumption; }
        }

        public string LabelAdd
        {
            get { return Texts.Lbl_Add; }
        }

        public string LabelPrice
        {
            get { return Texts.Lbl_Price; }
        }

        public string LabelAppBarAdd
        {
            get { return Texts.Lbl_Add; }
        }

        #endregion
    }

}
